<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>学生注册</title>
    <style>
        body { font-family: Arial, sans-serif; background: #f5f5f5; }
        .register-container { width: 400px; margin: 60px auto; background: #fff; padding: 30px 40px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
        h2 { text-align: center; margin-bottom: 30px; }
        .form-group { margin-bottom: 18px; }
        label { display: block; margin-bottom: 6px; color: #333; }
        input, select { width: 100%; padding: 8px 10px; border: 1px solid #ccc; border-radius: 4px; }
        .btn { width: 100%; background: #007bff; color: #fff; border: none; padding: 10px; border-radius: 4px; font-size: 16px; cursor: pointer; }
        .btn:hover { background: #0056b3; }
        .msg { color: red; text-align: center; margin-bottom: 10px; }
        .login-link { text-align: center; margin-top: 15px; }
    </style>
</head>
<body>
<div class="register-container">
    <h2>学生注册</h2>
    <form action="${pageContext.request.contextPath}/common?method=studentReg" method="post">
        <div class="form-group">
            <label for="sno">学号</label>
            <input type="text" id="sno" name="sno" required>
        </div>
        <div class="form-group">
            <label for="username">姓名</label>
            <input type="text" id="username" name="username" required>
        </div>
        <div class="form-group">
            <label for="password">密码</label>
            <input type="password" id="password" name="password" required>
        </div>
        <div class="form-group">
            <label for="type">类型</label>
            <select id="type" name="type" required>
                <option value="本科生">本科生</option>
                <option value="研究生">研究生</option>
                <option value="博士生">博士生</option>
            </select>
        </div>
        <div class="form-group">
            <label for="collage">学院</label>
            <input type="text" id="collage" name="collage" required>
        </div>
        <div class="form-group">
            <label for="major">专业</label>
            <input type="text" id="major" name="major" required>
        </div>
        <div class="form-group">
            <label for="birth">出生日期</label>
            <input type="date" id="birth" name="birth">
        </div>
        <div class="form-group">
            <label for="originPlace">籍贯</label>
            <input type="text" id="originPlace" name="originPlace">
        </div>
        <div class="msg">${msg}</div>
        <button type="submit" class="btn">注册</button>
    </form>
    <div class="login-link">
        已有账号？<a href="${pageContext.request.contextPath}/index.jsp">去登录</a>
    </div>
</div>
</body>
</html> 